package day6;

public class D6_3 {
    public static void main(String[] args) {
        shushu();
    }
    public static void shushu(){
        int count=0;
        for (int i=2;i<=100;i++){
            if (shishu(i)){
                System.out.print(i+" ");
                count++;
                if (count%5==0){
                    System.out.println();
                }
            }
        }
        System.out.println("1-100之间的素数有："+count+"个");
    }
    public static boolean shishu(int num){
        for (int q=2;q<num;q++){
            if (num%q==0){
                return false;
            }
        }
        return true;
    }
}

